package com.ruoyi.project.es.model;

import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.DateFormat;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;
import java.util.Date;

@Document(indexName = "curd", type = "user")
public class User implements Serializable{
    private static final long serialVersionUID = -1L;
    @Id
    private Integer id;
    @Field
    private String name;

//    private String date;

    public User(Integer id,String name){
        this.id=id;
        this.name=name;
    }

    public String getName() {
        return name;
    }


    public Integer getId() {
        return id;
    }

    public void setName(String name) {
        this.name = name;
    }



    public void setId(Integer id) {
        this.id = id;
    }
}
